import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import MyfileView from '../views/MyfileView.vue'
import UploadfileView from '../views/UploadfileView.vue'
import DownloadfileView from '../views/DownloadfileView'
import LoginandRegisterView from '../views/LoginandRegisterView'
import FindFileView from '../views/FindFileView'
import PersonInfo from '../views/PersonInfo'

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/myfile',
    name: 'myfile',
    component: MyfileView
  },
  {
    path: '/uploadfile',
    name: 'uploadfile',
    component: UploadfileView
  },
  {
    path: '/downloadfile',
    name: 'downloadfile',
    component: DownloadfileView
  },
  {
    path: '/loginandregister',
    name: 'loginandregister',
    component: LoginandRegisterView
  },
  {
    path: '/findfile',
    name: 'findfile',
    component: FindFileView
  },
  {
    path: '/personal',
    name: 'personal',
    component: PersonInfo
  },

]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
